﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DeviceManager.DataAccessLayer;
using DeviceManager.BusinessLogicLayer;

namespace DeviceManagementIT.RoomDevices.ManagerRoom
{
    public partial class frmRoomDevices : DevExpress.XtraEditors.XtraForm
    {
        RoomBllOperation unitbll;
        public frmRoomDevices()
        {
            InitializeComponent();
        }

        private void simpleButton3_Click(object sender, EventArgs e)
        {
            frmAddRoom m_frmAddRoom = new frmAddRoom();
            m_frmAddRoom.Show();
        }

        private void simpleButton2_Click(object sender, EventArgs e)
        {
            frmEditRoom m_frmEditRoom = new frmEditRoom();
            m_frmEditRoom.Show();
        }

        private void simpleButton4_Click(object sender, EventArgs e)
        {

        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            unitbll = new RoomBllOperation();
            List<BOPHAN> listunit = unitbll.GetRecordUnit(new BOPHAN());
            gridRoom.DataSource = listunit;
            gridView1.Columns[1].Caption = "Tên bộ phận";
            gridView1.Columns[3].Caption = "Diễn Giải";
            gridView1.Columns[0].Visible = false;
            gridView1.Columns[2].Visible = false;
            gridView1.Columns[4].Visible = false;
        }
    }
}